package com.hivis.service.impl;

import com.hivis.entity.SmsMsg;
import com.hivis.mapper.SmsMsgMapper;
import com.hivis.service.ISmsMsgService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

@Transactional
@Service
public class SmsMsgServiceImpl implements ISmsMsgService {
    @Resource
    private SmsMsgMapper smsMsgMapper;

    @Override
    public int insert(SmsMsg record) {
        return smsMsgMapper.insert(record);
    }

    @Override
    public void batchInsert(List<SmsMsg> records) {
        smsMsgMapper.batchInsert(records);
    }

    @Override
    public void deleteExpiredMessage(int expireHours) {
        smsMsgMapper.deleteExpiredMessage(expireHours);
    }
}
